﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

using ZhimeiSoft.CharmManager.DOL;
using ZhimeiSoft.CharmManager.Server.BLL.Interface;
using ZhimeiSoft.CharmManager.Server.DAL.Interface;
using ZhimeiSoft.CharmManager.Server.Factory;

namespace ZhimeiSoft.CharmManager.Server.BLL
{
    public class ServiceItemBLL : IServiceItemBLL
    {
        private IServiceItemDAL serviceItemDAL;

        public ServiceItemBLL()
        {
            serviceItemDAL = BaseDalFactory.CreateServiceItemDal();
        }

        public void  InsertServiceItem(DBEntityServiceItem serviceItem)
        {
            serviceItemDAL.InsertServiceItem(serviceItem);
        }

        public void  UpdateServiceItem(DBEntityServiceItem serviceItem)
        {
            serviceItemDAL.UpdateServiceItem(serviceItem);
        }

        public void SetServiceItemState(int serviceItemID, string sState)
        {
            serviceItemDAL.SetServiceItemState(serviceItemID, sState);
        }

        public DataSet  QueryServiceItem(string sFilter)
        {
            return serviceItemDAL.QueryServiceItem(sFilter);
        }

        public void ResetServiceItemCategory(int categoryid, int newcategoryid)
        {
            serviceItemDAL.ResetServiceItemCategory(categoryid, newcategoryid);
        }

        
    }
}
